﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ControlLugar.ascx.cs"
    Inherits="SchoolManagement.Forms.Controls.ControlLugar" %>
<%--<table>
    <tr>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
        <td >
            &nbsp;</td>
        <td colspan="3">
            <asp:Label ID="LabelResultadoLugar" runat="server" Text=""></asp:Label>
        </td>
    </tr>
</table>--%>
<table>
    <tr>
        <td>
            <asp:Label ID="LabelPais" runat="server" Text="Pais:"></asp:Label>
        </td>
      
    
        <td>
            <asp:DropDownList ID="DropDownListPais" runat="server" AutoPostBack="True" 
                DataSourceID="ObjectDataSourcePais" DataTextField="Nombre" DataValueField="Id" 
                onselectedindexchanged="DropDownListPais_SelectedIndexChanged" 
                Width="120px">
                <asp:ListItem>Seleccione...</asp:ListItem>
            </asp:DropDownList>
        </td>
         </tr>
        <tr>
        <td>
            <asp:Label ID="LabelDepartamento" runat="server" Text="Departamento:"></asp:Label>
        </td>
        <td>
            <asp:DropDownList ID="DropDownListDepartamento" runat="server" 
                AutoPostBack="True" 
                onselectedindexchanged="DropDownListDepartamento_SelectedIndexChanged" 
                DataSourceID="ObjectDataSourceDepartamentos" DataTextField="Nombre" 
                DataValueField="Id" TabIndex="1" Width="120px">
                <asp:ListItem>Seleccione...</asp:ListItem>
            </asp:DropDownList>
        </td>
          </tr>
        <tr>
        <td>
            <asp:Label ID="LabelMunicipio" runat="server" Text="Municipio:"></asp:Label>
        </td>
        <td>
            <asp:DropDownList ID="DropDownListMunicipio" runat="server" AutoPostBack="True" 
                onselectedindexchanged="DropDownListMunicipio_SelectedIndexChanged" 
                DataSourceID="ObjectDataSourceMunicipios" DataTextField="Nombre" 
                DataValueField="Id" ondatabound="DropDownListMunicipio_DataBound" 
                TabIndex="2" Width="120px">
                <asp:ListItem>Seleccione...</asp:ListItem>
            </asp:DropDownList>
        </td>
    </tr>
</table>
<asp:ObjectDataSource ID="ObjectDataSourcePais" runat="server" 
    TypeName="BussinessLogic.Lugares" SelectMethod="GetPaises">
</asp:ObjectDataSource>

<asp:ObjectDataSource ID="ObjectDataSourceMunicipios" runat="server" 
    SelectMethod="GetLugaresByPadre" TypeName="BussinessLogic.Lugares">
    <SelectParameters>
        <asp:Parameter Name="idLugarPadre" Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>

<asp:ObjectDataSource ID="ObjectDataSourceDepartamentos" runat="server" 
    SelectMethod="GetLugaresByPadre" TypeName="BussinessLogic.Lugares" 
    >
    <SelectParameters>
        <asp:Parameter Name="idLugarPadre" Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>




